﻿<Window x:Class="QLHH.DSHangHoaWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title= "Danh sách hoá đơn" Height="350" Width="700" Icon="Images/Book_angleHS.png" Loaded="Window_Loaded">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>

        <ToolBarTray  Grid.Row="0"  >
            <ToolBar Band="1" BandIndex="1">
                <Button  Name="mnNew" ToolTip="New" Click="mnNew_Click">
                    <StackPanel Orientation="Horizontal">
                        <Image HorizontalAlignment="Right" Source="Images/NewDocumentHS.png"/>
                        <TextBlock VerticalAlignment="Center"> Thêm Mới</TextBlock>
                    </StackPanel>
                </Button>
                <Button ToolTip="Edit" Name="btEdit" Click="btEdit_Click">
                    <StackPanel Orientation="Horizontal">
                        <Image Width="16" Height="16" Source="Images/Properties.png"/>
                        <TextBlock VerticalAlignment="Center"> Sửa</TextBlock>
                    </StackPanel>
                </Button>
                <Button ToolTip="Delete" Name="btDelete" Click="btDelete_Click">
                    <StackPanel Orientation="Horizontal">
                        <Image Width="16" Height="16" Source="Images/DeleteHS.png"/>
                        <TextBlock VerticalAlignment="Center">Xóa</TextBlock>
                    </StackPanel>
                </Button>
                <Button ToolTip="Seach">
                    <StackPanel Orientation="Horizontal">
                        <Image Width="16" Height="16" Source="Images/Find_VS.png"/>
                        <TextBlock VerticalAlignment="Center">Tìm Kiếm</TextBlock>
                    </StackPanel>
                </Button>
                <Button ToolTip="Print">
                    <StackPanel Orientation="Horizontal">
                        <Image Width="16" Height="16" Source="Images/PrintHS.png"/>
                        <TextBlock VerticalAlignment="Center"> In</TextBlock>
                    </StackPanel>
                </Button>
                <Separator/>
                <Button ToolTip="Close" Name="btClose" Click="btClose_Click">
                    <StackPanel Orientation="Horizontal">
                        <Image Width="16" Height="16" Source="Images/StopHS.png"/>
                        <TextBlock VerticalAlignment="Center"> Thoát</TextBlock>
                    </StackPanel>
                </Button>
            </ToolBar>
        </ToolBarTray>
        <DataGrid Name="datagrid" Grid.Row="1" AutoGenerateColumns="False">
            <DataGrid.Columns>
                <DataGridTextColumn Header="Số Hóa Đơn" Width="100" Binding="{Binding sohd}"></DataGridTextColumn>
                <DataGridTextColumn Header="Tên Hàng" Width="200" Binding="{Binding tenhang}"></DataGridTextColumn>
                <DataGridTextColumn Header="Số Lượng" Width="100" Binding="{Binding soluong}"></DataGridTextColumn>
                <DataGridTextColumn Header="Đơn Giá" Width="100" Binding="{Binding dongia}"></DataGridTextColumn>
                <DataGridTextColumn Header="Trị Giá" Width="100" Binding="{Binding trigia}"></DataGridTextColumn>
                <DataGridTextColumn Header="Khuyến Mãi" Width="100" Binding="{Binding khuyenmai}"></DataGridTextColumn>
                <DataGridTextColumn Header="Diễn Giải" Width="*" Binding="{Binding diengiai}"></DataGridTextColumn>
            </DataGrid.Columns>
        </DataGrid>
        <StatusBar Grid.Row="2">
            <StatusBarItem Name="sbiSohd" Content="Tổng số hóa đơn: "/>
        </StatusBar>
    </Grid>
</Window>